<template>
  <div class="edu-page-warp">
    <div class="edu-page-title">
      注册开放权限
    </div>
    <el-card shadow="never" body-style="padding: 24px;">
      <div class="edu-opertion-bar text-right">
        <el-button plain>{{$t('message.delete')}}</el-button>
        <el-button @click="addAuth()" type="primary">{{$t('message.add')}}</el-button>
      </div>
      <el-table
        :data="tableData5"
        style="width: 100%" class="has-top-border">
        <el-table-column type="expand">
          <template slot-scope="props">
            <el-form label-position="left" inline class="demo-table-expand">
              <el-form-item label="年级">
                <span>{{ props.row.academicYear }}</span>
              </el-form-item>
              <el-form-item label="生效时间">
                <span>{{ props.row.validDate }}</span>
              </el-form-item>
              <el-form-item label="失效时间">
                <span>{{ props.row.invalidDate }}</span>
              </el-form-item>
              <el-form-item label="培养类别">
                <span>{{ props.row.shopId }}</span>
              </el-form-item>
              <el-form-item label="学生类别">
                <span>{{ props.row.category }}</span>
              </el-form-item>
              <el-form-item label="学院">
                <span>{{ props.row.address }}</span>
              </el-form-item>
              <el-form-item label="所属部门">
                <span>{{ props.row.desc }}</span>
              </el-form-item>
            </el-form>
          </template>
        </el-table-column>
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="academicYear" label="年级"></el-table-column>
        <el-table-column prop="studentType" label="学生类型"></el-table-column>
        <el-table-column prop="college" label="学院"></el-table-column>
        <el-table-column prop="validDate" label="生效日期"></el-table-column>
        <el-table-column prop="invalidDate" label="失效日期"></el-table-column>
        <el-table-column label="状态">
          <template slot-scope="scope">
              <div slot="reference" class="name-wrapper">
                <el-tag size="medium">{{ scope.row.status }}</el-tag>
              </div>

          </template>
        </el-table-column>
        <el-table-column label="操作" width="180">
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="handleEdit(scope.$index, scope.row)">{{$t('message.shut')}}</el-button>
            <el-button type="text" size="mini" @click="handleEdit(scope.$index, scope.row)">{{$t('message.edit')}}</el-button>
            <el-button type="text" class="danger" size="mini" @click="handleDelete(scope.$index, scope.row)">{{$t('message.delete')}}</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
export default {
  name: "openRegister",
  data() {
    return {
      tableData5: [
        {
          academicYear: "2016级",
          name: "好滋好味鸡蛋仔",
          studentType: "研究生",
          college: "计算机学院",
          validDate: "2016-05-02",
          invalidDate: "2016-05-02",
          status: '开放中'
        },
        
      ]
    };
  },
  methods: {
    addAuth() {
      this.$router.push("/addAuthority");
    }
  }
};
</script>
<style lang="scss" scoped>
</style>
